<template>
  <div class="forum">
    <!-- 诗坛
    <a-button>诗坛</a-button> -->
    <div class="forum-left">
      <ForumLeft ref="forumLeft"></ForumLeft>
    </div>
    <div class="forum-right">
      <ForumRight @tellFather="haveAdd"></ForumRight>
    </div>
  </div>
</template>

<script>
import ForumLeft from "./ForumLeft";
import ForumRight from "./ForumRight";

export default {
  name: "Forum",
  components: {
    ForumLeft,
    ForumRight,
  },
  methods: {
    haveAdd(data) {
      this.$refs.forumLeft.haveAdd(data.newForum);
    },
  },
  mounted() {
    this.$emit("tellFather", { index: 3 });
  },
};
</script>

<style scoped>
.forum {
  margin-top: 8px;
  /* background-color: yellow; */
  height: 100%;
  /* flex-direction: "row"; */
  width: 55%;
  margin-left: 20%;
  display: flex;
}
.forum-left {
  height: 100%;
  width: 64%;
}
.forum-right {
  margin-left: 1%;
  height: 100%;
  width: 35%;
}
</style>
